﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace D3Calc
{
    public partial class EquipmentUserControl : UserControl
    {
        public EquipmentUserControl()
        {
            InitializeComponent();
        }

        public double Min
        {
            get
            {
                double value = 0.0;
                double.TryParse(this.txtMin.Text, out value);
                return value;
            }

            set 
            {
                this.txtMin.Text = value.ToString();
            }
        }

        public double Max
        {
            get
            {
                double value = 0.0;
                double.TryParse(this.txtMax.Text, out value);
                return value;
            }

            set
            {
                this.txtMax.Text = value.ToString();
            }
        }

        public double Main
        {
            get
            {
                double value = 0.0;
                double.TryParse(this.txtMain.Text, out value);
                return value;
            }

            set
            {
                this.txtMain.Text = value.ToString();
            }
        }

        public double Crit
        {
            get
            {
                double value = 0.0;
                double.TryParse(this.txtCrit.Text, out value);
                return value;
            }

            set
            {
                this.txtCrit.Text = value.ToString();
            }
        }

        public double Hurt
        {
            get
            {
                double value = 0.0;
                double.TryParse(this.txtHurt.Text, out value);
                return value;
            }

            set
            {
                this.txtHurt.Text = value.ToString();
            }
        }

        public double Speed
        {
            get
            {
                double value = 0.0;
                double.TryParse(this.txtSpeed.Text, out value);
                return value;
            }

            set
            {
                this.txtSpeed.Text = value.ToString();
            }
        }
    }
}
